using System;
using CStock;
using CUtil;
using System.Diagnostics;
using System.ComponentModel;

namespace CStock
{

    //[System.Xml.Serialization.XmlRootAttribute("TradeCondition", Namespace="", IsNullable=false)]
    public class EconomyStatus : StockObjectBase, IEconomyStatus
    {


        private DateTime date;

        
        double percentage_Inflation;
        double percentage_Productivity;
        double percentage_Shares;
        double percentage_Bonds_05;
        double percentage_Bonds_30;
        double percentage_Bonds_00;
        bool bondsSell;
        bool bondsBuy;
        double percentage_Overall;
        double percentage_InterestCB;

        public EconomyStatus()
		{
            this.iD = "StartStatus";
           
            ResetPathFromConfiguration();
			
		}
        public override bool ResetPathFromConfiguration()
        {
            
            ProgramContext pc = ProgramContext.Instance;
            Debug.Assert(pc != null, "Initialize ProgramContext first ...");
            if (pc != null)
                this.path = pc.Configuration.Directories.EconomyStatusPath ;
            return true;


        }

        public override string Name
        {
            get
            {
                return this.iD;
            }
            set
            {
                base.iD = value;
            }
        }
        public DateTime Date
        {
            get
            {
                return this.date;
            }
            set
            {
                this.date = value;
            }
        }
        public bool BondsSell
        {
            get
            {
                return this.bondsSell;
            }
            set
            {
                this.bondsSell = value;
            }
        }
        public bool BondsBuy
        {
            get
            {
                return this.bondsBuy;
            }
            set
            {
                this.bondsBuy = value;
            }
        }


        #region IEconomyStatus Members

      

        public double Percentage_Inflation
        {
            get
            {
                return this.percentage_Inflation;
            }
            set
            {
                percentage_Inflation = value;
            }
        }

        public double Percentage_Productivity
        {
            get
            {
                return this.percentage_Productivity;
            }
            set
            {
                percentage_Productivity = value;
            }
        }

        public double Percentage_Shares
        {
            get
            {
                return this.percentage_Shares;
            }
            set
            {
                percentage_Shares = value;
            }
        }

        public double Percentage_Bonds_05
        {
            get
            {
                return this.percentage_Bonds_05;
            }
            set
            {
                percentage_Bonds_05 = value;
            }
        }

        public double Percentage_Bonds_30
        {
            get
            {
                return this.percentage_Bonds_30;
            }
            set
            {
                percentage_Bonds_30 = value;
            }
        }

        public double Percentage_Bonds_00
        {
            get
            {
                return this.percentage_Bonds_00;
            }
            set
            {
                percentage_Bonds_00 = value;
            }
        }

        public double Percentage_Overall
        {
            get
            {
                return this.percentage_Overall;
            }
            set
            {
                percentage_Overall = value;
            }
        }
        public double Percentage_InterestCB
        {
            get
            {
                return this.percentage_InterestCB;
            }
            set
            {
                percentage_InterestCB = value;
            }
        }
        public override string ToString()
        {
            return this.date.ToShortDateString();
        }
        

        #endregion
    }
}
